//


#import "MB_ReadTableViewCell.h"

@implementation MB_ReadTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        //
        UILabel * label1 = [[UILabel alloc]init];
        label1.textColor = rgba(30, 30, 30, 1);
        label1.font = FontPFMedium(kRWidth(17));
        label1.text = @"Reading notes";
        [self.contentView addSubview:label1];
        [label1 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_offset(kRHeight(10));
            make.left.mas_offset(kRWidth(15));
            make.height.mas_equalTo(kRHeight(20));
        }];
        //
        self.dateLabel = ({
            UILabel *label = [[UILabel alloc]init];
            label.textColor = rgba(210, 210, 210, 1);
            label.font = FontPFMedium(kRWidth(15));
            label.text = @"";
            [self.contentView addSubview:label];
            label;
        });
        [self.dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(label1);
            make.right.mas_offset(-kRWidth(15));
            make.height.mas_equalTo(kRHeight(20));
        }];
        
        self.labelH = ({
            UILabel *label = [[UILabel alloc]init];
            label.textColor = rgba(210, 210, 210, 1);
            label.font = FontPFRegular(kRWidth(15));
            label.text = @"highlights->";
            [self.contentView addSubview:label];
            label;
        });
        [self.labelH mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(label1.mas_bottom).offset(kRHeight(10));
            make.left.mas_offset(kRWidth(15));
            make.height.mas_equalTo(kRHeight(20));
        }];
        
        self.labelN = ({
            UILabel *label = [[UILabel alloc]init];
            label.textColor = rgba(210, 210, 210, 1);
            label.font = FontPFRegular(kRWidth(15));
            label.text = @"notational->";
            [self.contentView addSubview:label];
            label;
        });
        [self.labelN mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.labelH.mas_bottom).offset(kRHeight(10));
            make.left.mas_offset(kRWidth(15));
            make.height.mas_equalTo(kRHeight(20));
        }];
        
        self.labelS = ({
            UILabel *label = [[UILabel alloc]init];
            label.textColor = rgba(210, 210, 210, 1);
            label.font = FontPFRegular(kRWidth(15));
            label.text = @"summary1->";
            [self.contentView addSubview:label];
            label;
        });
        [self.labelS mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.labelN.mas_bottom).offset(kRHeight(10));
            make.left.mas_offset(kRWidth(15));
            make.height.mas_equalTo(kRHeight(20));
        }];
    }
    return self;
}
//
- (void)setModel:(ReadData *)model {
    _model = model;
    //
    self.labelH.text = [NSString stringWithFormat:@"highlights->%@",model.highlights];
    self.labelN.text = [NSString stringWithFormat:@"notational->%@",model.notational];
    self.labelS.text = [NSString stringWithFormat:@"summary->%@",model.summary];
    self.dateLabel.text = model.date;
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
